Optimal. Leaf size=77 \[ \frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{b^2 d \sqrt {a+b}}-\frac {x (2 a-b)}{2 b^2}-\frac {\sin (c+d x) \cos (c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3187, 470, 522, 203, 205} \[ \frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{b^2 d \sqrt {a+b}}-\frac {x (2 a-b)}{2 b^2}-\frac {\sin (c+d x) \cos (c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 205
Rule 470
Rule 522
Rule 3187
Rubi steps
\begin {align*} \int \frac {\sin ^4(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x) \sin (c+d x)}{2 b d}+\frac {\operatorname {Subst}\left (\int \frac {a+(-a+b) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{2 b d}\\ &=-\frac {\cos (c+d x) \sin (c+d x)}{2 b d}+\frac {a^2 \operatorname {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{b^2 d}-\frac {(2 a-b) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{2 b^2 d}\\ &=-\frac {(2 a-b) x}{2 b^2}+\frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{b^2 \sqrt {a+b} d}-\frac {\cos (c+d x) \sin (c+d x)}{2 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 69, normalized size = 0.90 \[ -\frac {-\frac {4 a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {a+b}}+2 (2 a-b) (c+d x)+b \sin (2 (c+d x))}{4 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 305, normalized size = 3.96 \[ \left [-\frac {2 \, {\left (2 \, a - b\right )} d x + 2 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a \sqrt {-\frac {a}{a + b}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{4 \, b^{2} d}, -\frac {{\left (2 \, a - b\right )} d x + b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{2 \, b^{2} d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 114, normalized size = 1.48 \[ \frac {\frac {2 \, {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} a^{2}}{\sqrt {a^{2} + a b} b^{2}} - \frac {{\left (d x + c\right )} {\left (2 \, a - b\right )}}{b^{2}} - \frac {\tan \left (d x + c\right )}{{\left (\tan \left (d x + c\right )^{2} + 1\right )} b}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 94, normalized size = 1.22 \[ \frac {a^{2} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{d \,b^{2} \sqrt {a \left (a +b \right )}}-\frac {\tan \left (d x +c \right )}{2 d b \left (\tan ^{2}\left (d x +c \right )+1\right )}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{2 d b}-\frac {\arctan \left (\tan \left (d x +c \right )\right ) a}{d \,b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 78, normalized size = 1.01 \[ \frac {\frac {2 \, a^{2} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{2}} - \frac {{\left (d x + c\right )} {\left (2 \, a - b\right )}}{b^{2}} - \frac {\tan \left (d x + c\right )}{b \tan \left (d x + c\right )^{2} + b}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 13.97, size = 481, normalized size = 6.25 \[ \frac {b^2\,\mathrm {atan}\left (\frac {\sin \left (c+d\,x\right )}{\cos \left (c+d\,x\right )}\right )}{d\,\left (2\,b^3+2\,a\,b^2\right )}-\frac {2\,a^2\,\mathrm {atan}\left (\frac {\sin \left (c+d\,x\right )}{\cos \left (c+d\,x\right )}\right )}{d\,\left (2\,b^3+2\,a\,b^2\right )}-\frac {b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d\,\left (2\,b^3+2\,a\,b^2\right )}-\frac {a\,b\,\sin \left (2\,c+2\,d\,x\right )}{2\,d\,\left (2\,b^3+2\,a\,b^2\right )}-\frac {a\,b\,\mathrm {atan}\left (\frac {\sin \left (c+d\,x\right )}{\cos \left (c+d\,x\right )}\right )}{d\,\left (2\,b^3+2\,a\,b^2\right )}-\frac {\mathrm {atan}\left (\frac {a\,\sin \left (c+d\,x\right )\,{\left (-a^4-b\,a^3\right )}^{3/2}\,8{}\mathrm {i}+b\,\sin \left (c+d\,x\right )\,{\left (-a^4-b\,a^3\right )}^{3/2}\,4{}\mathrm {i}+a^5\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,8{}\mathrm {i}+b^5\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,1{}\mathrm {i}-a\,b^4\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,1{}\mathrm {i}+a^4\,b\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,12{}\mathrm {i}-a^2\,b^3\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,5{}\mathrm {i}+a^3\,b^2\,\sin \left (c+d\,x\right )\,\sqrt {-a^4-b\,a^3}\,1{}\mathrm {i}}{3\,\cos \left (c+d\,x\right )\,a^5\,b^2+5\,\cos \left (c+d\,x\right )\,a^4\,b^3+\cos \left (c+d\,x\right )\,a^3\,b^4-\cos \left (c+d\,x\right )\,a^2\,b^5}\right )\,\sqrt {-a^4-b\,a^3}\,2{}\mathrm {i}}{d\,\left (2\,b^3+2\,a\,b^2\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________